<template>
  <div class="container">
    <h1 v-if="error.statusCode === 404">页面不存在</h1>
    <h1 v-else>{{ error.message }}</h1>
    <el-button @click="home">首 页</el-button>
  </div>
</template>

<script>
  export default {
    props: ['error'],
    methods: {
      home: function () {
        this.$router.push({path:'/'});
      }
    }
  }
</script>
